package jp.wug;

import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;

public class Keys<K, V> implements Iterable<K> {
    private final Collection<K> keys;

    public Keys(Collection<K> keys) {
        this.keys = keys;
    }

    public static <K, V> Keys<K, V> create(Collection<K> keys) {
        return new Keys<K, V>(keys);
    }

    public static <K, V> Keys<K, V> create(K... keys) {
        return new Keys<K, V>(Arrays.asList(keys));
    }

    public Collection<K> getKeys() {
        return keys;
    }

    public Iterator<K> iterator() {
        return keys.iterator();
    }

    public K getNullKey() {
        return null;
    }

    public V getNullValue() {
        return null;
    }
}
